package com.yuntsg.nnsfcp.common.aop;//package com.qf.nnsfcp.common.aop;
//
//import entity.front.com.yuntsg.nnsfcp.OrderBaseInfo;
//import entity.front.com.yuntsg.nnsfcp.OrderIndexTime;
//import mapper.front.com.yuntsg.nnsfcp.OrderBaseInfoMapper;
//import mapper.front.com.yuntsg.nnsfcp.OrderIndexTimeMapper;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.*;
//import org.springframework.stereotype.Component;
//import javax.annotation.Resource;
//import java.time.LocalDateTime;
//import java.util.Arrays;
//import java.util.List;
//
//
///**
// * 处理所有的改变状态时的进行aop捕获
// *
// * @time:2019年7月10日10:49:09
// */
////@Aspect
//@Component
//public class OrderStatusTimeAOP {
//
//
//    @Resource
//    OrderIndexTimeMapper orderIndexTimeMapper;
//
//    @Resource
//    OrderBaseInfoMapper orderBaseInfoMapper;
//
//    //back.controller.com.yuntsg.nnsfcp.WorkbenchController
////    @Pointcut("execution(* back.service.com.yuntsg.nnsfcp.BackService.changeStatus(..))")
////    public void controllerMethod() {
////        //拦截的方法与环绕方法必须返回值一样  否则就报
//////        org.springframework.aop.AopInvocationException: Null return value from advic
////
////    }
//
//
//
//
//////    @Around("controllerMethod()")
////    public int handlerControllerMethod(ProceedingJoinPoint pjp) {
////        /*
////        * 2019年7月10日15:58:53
////        * gcr
////        * 总觉得有种脱裤子放屁的感觉
////        * */
////        System.out.println("拦截信息了吗？");
////        List proceed = Arrays.asList(pjp.getArgs());
////        int orderId = Integer.parseInt(proceed.get(0).toString());
////        OrderBaseInfo orderBaseInfo = orderBaseInfoMapper.selectById(orderId);
////        orderBaseInfo.setOrderStatusType(orderBaseInfo.getOrderStatusType() + 1);
////        orderBaseInfoMapper.updateById(orderBaseInfo);
////        OrderIndexTime orderIndexTime = new OrderIndexTime();
////        orderIndexTime.setOrderId(orderId);
////        orderIndexTime.setOrderStatus(orderBaseInfo.getOrderStatusType());
////        orderIndexTime.setAddTime(LocalDateTime.now());
////        int insert = orderIndexTimeMapper.insert(orderIndexTime);
////        return insert;
////    }
//
//}
